From dfcc40ef9a5963130fa9ab0a114817a47c5e20fd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Sun, 20 Oct 2019 08:43:50 +0200 Subject: [PATCH] text: Propagate pango attributes to placeholder Not sure if this is really always wanted or whether we need to filter the attributes, or even create a separate property for them. --- gtk/gtktext.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gtk/gtktext.c b/gtk/gtktext.c index f4b15872b1..698b1421eb 100644 --- a/gtk/gtktext.c +++ b/gtk/gtktext.c @@ -6467,6 +6467,7 @@ gtk_text_set_placeholder_text (GtkText *self, "xalign", 0.0f, "ellipsize", PANGO_ELLIPSIZE_END, NULL); + gtk_label_set_attributes (GTK_LABEL (priv->placeholder), priv->attrs); gtk_widget_insert_after (priv->placeholder, GTK_WIDGET (self), NULL); } else @@ -6621,6 +6622,9 @@ gtk_text_set_attributes (GtkText *self, pango_attr_list_unref (priv->attrs); priv->attrs = attrs; + if (priv->placeholder) + gtk_label_set_attributes (GTK_LABEL (priv->placeholder), attrs); + g_object_notify_by_pspec (G_OBJECT (self), text_props[PROP_ATTRIBUTES]); gtk_text_recompute (self); -- 2.30.2